package com.tang.model.v1;

import com.tang.model.domain.Member;

import java.util.Objects;

/**
 * @Author tangyuan2meicloud.com
 * @DATE 2021/9/2 20:09
 * @Desc
 * @Remarks
 */
public  class CheckHandler extends Handler {

    @Override
    public void exec(Member member) {
        if (Objects.isNull(member.getUsername()) || Objects.isNull(member.getPassword())) {
            System.out.println("用户名密码不能为空！");
            return;
        }
        System.out.println("校验成功");
        if (handler != null) {
            handler.exec(member);
        }
    }
}
